using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyAnimationTrigger: MonoBehaviour
{
    private Enemy enemy;

    private Enemy GetEnemy()
    {
        if (enemy == null)
        {
            enemy = GetComponentInParent<Enemy>();
        }
        return enemy;
        
    }
    private void AnimationTrigger()
    {
        GetEnemy().AnimationTrigger();
    }

    private void AttackTrigger()
    {
        GetEnemy().AttackTrigger();
    }

    private void OpenCounterAttackWindow()
    { 
        GetEnemy().OpenCounterAttackWindow();
    }

    private void CloseCounterAttackWindow()
    {
        GetEnemy().CloseCounterAttackWindow();
    }
}
